const setting = require('./setting/setting.js');
const apiConfig = require('./setting/api_config.js');

App({
	onLaunch: function (options) {
		console.log('App Launch - 使用自建服务器API');

		// 初始化API配置
		apiConfig.init();

		this.globalData = {};

		// 用于自定义导航栏
		wx.getSystemInfo({
			success: e => {
					this.globalData.statusBarHeight = e.statusBarHeight;
				let capsule = wx.getMenuButtonBoundingClientRect();
				if (capsule) { 
					this.globalData.customBarHeight = capsule.bottom + capsule.top - e.statusBarHeight;
					this.globalData.capsule = capsule;
				} else {
					this.globalData.customBarHeight = e.statusBarHeight + 50;
				
				} 
			}
		});
	}, 
	 
})